<header class="header">
    <nav class="navbar navbar-default" id="navbar" style="background-color: rgba(0, 0, 0, 0.85); box-shadow: 0px 0px 3px rgba(0,0,0,.3);">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#header-navbar" aria-expanded="false">
                    <span class="sr-only"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span> </button>
                <span class="logo hvr-bounce-in"><a href="/" title="犯二青年博客"><img src="{{ URL::asset('images/logo.png') }}" alt=""></a></span>
            </div>
            <div class="collapse navbar-collapse" id="header-navbar">
                <ul class="nav navbar-nav navbar-header navbar-right l-navbar">
                    <li><a href="/">首页</a></li>
                    @foreach(Cache::get('menu') as $id => $name)
                        <li><a href="/category/{{ $id }}">{{ $name }}</a></li>
                    @endforeach

                    <li><a href="{{url('article/7')}}">关于我</a></li>

                    @guest
                        <li class="nav-item" id="l-navbar-login">
                            <a class="nav-link login" href="#" data-toggle="modal" data-target="#loginModal" rel="nofollow">登录</a>
                        </li>
                    @else
                        <li class="nav-item" id="l-navbar-login">
                            <a class="nav-link login" href="#" data-toggle="modal" data-target="#userModal" rel="nofollow">你好 {{ Auth::user()->name }} ！</a>
                        </li>
                    @endguest
{{--                    <li class="nav-item">--}}
{{--                        <a class="nav-link" href="/">帮助--}}
{{--                        </a>--}}
{{--                    </li>--}}
                </ul>
                <form class="navbar-form visible-xs" action="{{ url('/search') }}" method="post">
                    <div class="input-group">
                        <input type="text" name="keyword" class="form-control" placeholder="请输入关键字" maxlength="20" auqiniu_urlomplete="off">
                        <span class="input-group-btn">
            <button class="btn btn-default btn-search" name="search" type="submit">搜索</button>
            </span> </div>
                </form>
            </div>
        </div>
    </nav>
</header>
